/******************************************************************************
This .do file produces the descriptive statistics in Table 2
******************************************************************************/

clear
use "ess_cleaned_whole.dta"
set more off

*Restrict to citizens
keep if citizen == 1
keep if country != "Italy" & country != "Luxembourg"

/*********************************
Weights
*********************************/

gen anweight = pspwght*pweight
label var anweight "Analysis Weight"

svyset [pweight=anweight], strata(strata)

foreach var in vote_elections beactive volunteer obey opinions support_others self_te cons_open {
	svy: mean `var'
	_pctile `var' [pweight=anweight], p(25 50 75)
	return list
}
